<app-input field="metadataLocation" [change]="service" [orig]="original">
  <mat-form-field class="textInput">
    <mat-placeholder i18n-placeholder="services.form.label.saml.metadata.location">
      {{ messages.services_form_label_saml_metadata_location }}
    </mat-placeholder>
    <input matInput required [(ngModel)]="service.metadataLocation">
    <mat-hint align="end">
      <app-hint></app-hint>
    </mat-hint>
  </mat-form-field>
  <mat-icon appHelp
            i18n-matTooltip="services.form.tooltip.saml.metadata.location"
            [matTooltip]="messages.services_form_tooltip_saml_metadata_location">
  </mat-icon>
</app-input>

<app-input field="metadataMaxValidity" [change]="service" [orig]="original">
  <mat-form-field class="textInput">
    <mat-placeholder i18n-placeholder="services.form.label.saml.metadata.maximumvalidity">
      {{ messages.services_form_label_saml_metadata_maximumvalidity }}
    </mat-placeholder>
    <input matInput [(ngModel)]="service.metadataMaxValidity">
    <mat-hint align="end">
      <app-hint></app-hint>
    </mat-hint>
  </mat-form-field>
  <mat-icon appHelp
            i18n-matTooltip="services.form.tooltip.saml.metadata.maximumvalidity"
            [matTooltip]="messages.services_form_tooltip_saml_metadata_maximumvalidity">
  </mat-icon>
</app-input>

<app-input field="metadataSignatureLocation" [change]="service" [orig]="original">
  <mat-form-field class="textInput">
    <mat-placeholder i18n-placeholder="services.form.label.saml.metadata.signaturepublickeylocation">
      {{ messages.services_form_label_saml_metadata_signaturepublickeylocation }}
    </mat-placeholder>
    <input matInput [(ngModel)]="service.metadataSignatureLocation">
    <mat-hint align="end">
      <app-hint></app-hint>
    </mat-hint>
  </mat-form-field>
  <mat-icon appHelp
            i18n-matTooltip="services.form.tooltip.saml.metadata.signaturepublickeylocation"
            [matTooltip]="messages.services_form_tooltip_saml_metadata_signaturepublickeylocation">
  </mat-icon>
</app-input>

<app-input field="metadataExpirationDuration" [change]="service" [orig]="original">
  <mat-form-field class="textInput">
    <mat-placeholder i18n>
      Metadata Expiration Duration
    </mat-placeholder>
    <input matInput [(ngModel)]="service.metadataExpirationDuration">
    <mat-hint align="end">
      <app-hint></app-hint>
    </mat-hint>
  </mat-form-field>
  <mat-icon appHelp i18n-matTooltip
            matTooltip="If defined, will expire metadata in the cache after the indicated duration which will force CAS to retrieve and resolve the metadata again.">
  </mat-icon>
</app-input>

<app-input field="metadataCriteriaPattern" [change]="service" [orig]="original">
  <mat-form-field class="textInput">
    <mat-placeholder i18n-placeholder="services.form.label.saml.metadata.pattern">
      {{ messages.services_form_label_saml_metadata_pattern }}
    </mat-placeholder>
    <input matInput [(ngModel)]="service.metadataCriteriaPattern">
    <mat-hint align="end">
      <app-hint></app-hint>
    </mat-hint>
  </mat-form-field>
  <mat-icon appHelp
            i18n-matTooltip="services.form.tooltip.saml.metadata.pattern"
            [matTooltip]="messages.services_form_tooltip_saml_metadata_pattern">
  </mat-icon>
</app-input>

<app-input field="metadataCriteriaDirection" [change]="service" [orig]="original">
  <mat-form-field class="textInput">
    <mat-placeholder i18n-placeholder="services.form.label.saml.metadata.dir">
      {{ messages.services_form_label_saml_metadata_dir }}
    </mat-placeholder>
    <mat-select [(ngModel)]="service.metadataCriteriaDirection">
      <mat-option *ngFor="let opt of data.formData.samlDirections" [value]="opt">
        {{ opt }}
      </mat-option>
    </mat-select>
    <mat-hint align="end">
      <app-hint></app-hint>
    </mat-hint>
  </mat-form-field>
  <mat-icon appHelp
            i18n-matTooltip="services.form.tooltip.saml.metadata.dir"
            [matTooltip]="messages.services_form_tooltip_saml_metadata_dir">
  </mat-icon>
</app-input>

<app-input field="metadataCriteriaRoles" [change]="service" [orig]="original">
  <mat-form-field class="textInput">
    <mat-placeholder i18n-placeholder="services.form.label.saml.metadata.role">
      {{ messages.services_form_label_saml_metadata_role }}}
    </mat-placeholder>
    <mat-select [(ngModel)]="service.metadataCriteriaRoles">
      <mat-option *ngFor="let opt of data.formData.samlRoles" [value]="opt">
        {{ opt }}
      </mat-option>
    </mat-select>
    <mat-hint align="end">
      <app-hint></app-hint>
    </mat-hint>
  </mat-form-field>
  <mat-icon appHelp
            i18n-matTooltip="services.form.tooltip.saml.metadata.role"
            [matTooltip]="messages.services_form_tooltip_saml_metadata_role">
  </mat-icon>
</app-input>

<app-input field="metadataCriteriaRemoveEmptyEntitiesDescriptors" [change]="service" [orig]="original">
  <mat-checkbox [(ngModel)]="service.metadataCriteriaRemoveEmptyEntitiesDescriptors">
    <ng-container i18n="services.form.saml.removeEmptyEntities">
      {{ messages.services_form_label_saml_removeEmptyEntities }}
    </ng-container>
    <mat-icon appHelp
              i18n-matTooltip="services.form.tooltip.saml.removeEmptyEntitities"
              [matTooltip]="messages.services_form_tooltip_saml_removeEmptyEntities">
    </mat-icon>
    <mat-hint align="end">
      <app-hint></app-hint>
    </mat-hint>
  </mat-checkbox>
</app-input>

<app-input style="padding-bottom: 10px;"
           field="metadataCriteriaRemoveRolelessEntityDescriptors" [change]="service" [orig]="original">
  <mat-checkbox [(ngModel)]="service.metadataCriteriaRemoveRolelessEntityDescriptors">
    <ng-container i18n="services.form.label.saml.removeRoleless">
      {{ messages.services_form_label_saml_removeRoleless }}
    </ng-container>
    <mat-icon appHelp
              i18n-matTooltip="services.form.tooltip.saml.removeRoleless"
              [matTooltip]="messages.services_form_tooltip_saml_removeRoleless">
    </mat-icon>
    <mat-hint align="end">
      <app-hint></app-hint>
    </mat-hint>
  </mat-checkbox>
</app-input>
